package com.humanminoritygame.model;

import javax.persistence.Embeddable;
import javax.persistence.EnumType;
import javax.persistence.Enumerated;

@Embeddable
public class ResultSummary {

	@Enumerated(EnumType.STRING)
	private AnswerType answer;
	private Integer difference;
	private Integer roomAcumulatedValue;
	
	ResultSummary() {
	}

	public ResultSummary(AnswerType answer, int difference, int roomAcumulatedValue) {
		this.answer = answer;
		this.difference = difference;
		this.roomAcumulatedValue = roomAcumulatedValue;
	}

	public AnswerType getAnswer() {
		return answer;
	}

	public int getDifference() {
		return difference;
	}

	public int getRoomAcumulatedValue(){
	  return roomAcumulatedValue;
	}

  public int getAnswerValue() {
    if(answer.equals(AnswerType.A)){
      return 1;
    } else {
      return -1;
    }
  }
	
}
